/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.msk.wlhy.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.msk.common.utils.DictUtils;
import com.msk.sys.domain.DataEntity;
import com.msk.sys.domain.Office;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * <p>[]</p>
 * <p>作者：zkp</p>
 * <p>邮箱：zkp@changxin.com</p>
 * <p>创建时间： 2018-06-06 </p>
 * <p>类说明：企业信息维护Entity </p>
 * <p>修改记录：</p>
 */
public class HtCompany extends DataEntity<HtCompany> {
	
	private static final long serialVersionUID = 1L;
	private String companyName;
	private String area;
   	private String areaName;
	private String companyPlace;
	private String zipCode;
	private Integer sort;
	private String attstr01;
	private String attstr02;
	private String attstr03;
	private String attstr04;
	private Date attdate01;
	private Date attdate02;
	
	@NotNull(message = "归属公司不能为空")
	private Office company;
	@NotNull(message = "归属部门不能为空")
	private Office office;
	private String companyCustomerId;
	private String companyCustomerName;
	private String companyCustomerNumber;
	private String companyCustomerId1;
	private String companyCustomerName1;
	private String companyCustomerNumber1;
	private String customerName;//发货企业
	private String customerName1;//收货企业
	private String contacts;//发货联系人
	private String contactNumber;//发货联系电话
	private String contacts2;//收货联系人
	private String contactNumber2;//收货联系电话
	private String useType;//使用类型 1:公有 2:私有
	//add By Wlxiang  contractId,contractName 新增货源需要在选择货后将合同同带出
	private Date ioDate;
	private String  contractId;//采购合同ID
	private String contractName;//采购合同名称

	private String affiliatedPersonId; //所属人

	private String IOType;
	private String IOTypeAlias;
	private String IOStatus;
	private String IOStatusAlias;
	private String ifSucess;
	private String ifSucessAlias;
    
	private List<HtCompanyCustomer> companyCustomerList;//企业客户
    
	private String sourceBillName;

	private String userId;

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public HtCompany() {
		super();
	}
	
	public HtCompany(String id){
		super(id);
	}
	
	@Length(min=0, max=100, message="客户名称长度必须介于 0 和 100 之间")
	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}
	
	@Length(min=0, max=100, message="所属区域长度必须介于 0 和 100 之间")
	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}
	
	@Length(min=0, max=200, message="客户地址长度必须介于 0 和 200 之间")
	public String getCompanyPlace() {
		return companyPlace;
	}

	public void setCompanyPlace(String companyPlace) {
		this.companyPlace = companyPlace;
	}
	
	@Length(min=0, max=20, message="邮编长度必须介于 0 和 20 之间")
	public String getZipCode() {
		return zipCode;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}
	
	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}
	
	@Length(min=0, max=200, message="attstr01长度必须介于 0 和 200 之间")
	public String getAttstr01() {
		return attstr01;
	}

	public void setAttstr01(String attstr01) {
		this.attstr01 = attstr01;
	}
	
	@Length(min=0, max=200, message="attstr02长度必须介于 0 和 200 之间")
	public String getAttstr02() {
		return attstr02;
	}

	public void setAttstr02(String attstr02) {
		this.attstr02 = attstr02;
	}
	
	@Length(min=0, max=200, message="attstr03长度必须介于 0 和 200 之间")
	public String getAttstr03() {
		return attstr03;
	}

	public void setAttstr03(String attstr03) {
		this.attstr03 = attstr03;
	}
	
	@Length(min=0, max=200, message="attstr04长度必须介于 0 和 200 之间")
	public String getAttstr04() {
		return attstr04;
	}

	public void setAttstr04(String attstr04) {
		this.attstr04 = attstr04;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getAttdate01() {
		return attdate01;
	}

	public void setAttdate01(Date attdate01) {
		this.attdate01 = attdate01;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getAttdate02() {
		return attdate02;
	}

	public void setAttdate02(Date attdate02) {
		this.attdate02 = attdate02;
	}
	
	
	
	public String getAreaName() {
		return areaName;
	}

	
	public void setAreaName(String areaName) {
		this.areaName = areaName;
	}
	
	public String getLogTitle() {
		return "企业信息维护";
	}
	
//	public String getLogType() {
//		return Log.LogType.module_operate.name();
//	}

	public Office getCompany() {
		return company;
	}

	public void setCompany(Office company) {
		this.company = company;
	}

	public Office getOffice() {
		return office;
	}

	public void setOffice(Office office) {
		this.office = office;
	}

	public List<HtCompanyCustomer> getCompanyCustomerList() {
		return companyCustomerList;
	}

	public void setCompanyCustomerList(List<HtCompanyCustomer> companyCustomerList) {
		this.companyCustomerList = companyCustomerList;
	}

	public String getCompanyCustomerId() {
		return companyCustomerId;
	}

	public void setCompanyCustomerId(String companyCustomerId) {
		this.companyCustomerId = companyCustomerId;
	}

	public String getCompanyCustomerName() {
		return companyCustomerName;
	}

	public void setCompanyCustomerName(String companyCustomerName) {
		this.companyCustomerName = companyCustomerName;
	}

	public String getCompanyCustomerNumber() {
		return companyCustomerNumber;
	}

	public void setCompanyCustomerNumber(String companyCustomerNumber) {
		this.companyCustomerNumber = companyCustomerNumber;
	}

	public String getCompanyCustomerId1() {
		return companyCustomerId1;
	}

	public void setCompanyCustomerId1(String companyCustomerId1) {
		this.companyCustomerId1 = companyCustomerId1;
	}

	public String getCompanyCustomerName1() {
		return companyCustomerName1;
	}

	public void setCompanyCustomerName1(String companyCustomerName1) {
		this.companyCustomerName1 = companyCustomerName1;
	}

	public String getCompanyCustomerNumber1() {
		return companyCustomerNumber1;
	}

	public void setCompanyCustomerNumber1(String companyCustomerNumber1) {
		this.companyCustomerNumber1 = companyCustomerNumber1;
	}
	public String getIOType() {
		return IOType;
	}

	public void setIOType(String iOType) {
		IOType = iOType;
	}

	public String getIOTypeAlias() {
		if (StringUtils.isBlank(IOTypeAlias)) {
			return DictUtils.getDictLabel(IOType, "IO_type", "");
		}
		return IOTypeAlias;
	}

	public void setIOTypeAlias(String iOTypeAlias) {
		IOTypeAlias = iOTypeAlias;
	}
	public String getIOStatus() {
		return IOStatus;
	}

	public void setIOStatus(String iOStatus) {
		IOStatus = iOStatus;
	}

	public String getIOStatusAlias() {
		if (StringUtils.isBlank(IOStatusAlias)) {
			return DictUtils.getDictLabel(IOStatus, "IO_status", "");
		}
		return IOStatusAlias;
	}

	public void setIOStatusAlias(String iOStatusAlias) {
		IOStatusAlias = iOStatusAlias;
	}


	public String getIfSucess() {
		return ifSucess;
	}

	public void setIfSucess(String ifSucess) {
		this.ifSucess = ifSucess;
	}

	public String getIfSucessAlias() {
		if (StringUtils.isBlank(ifSucessAlias)) {
			return DictUtils.getDictLabel(ifSucess, "IF_sucess", "");
		}
		return ifSucessAlias;
	}

	public void setIfSucessAlias(String ifSucessAlias) {
		this.ifSucessAlias = ifSucessAlias;
	}

	public String getSourceBillName() {
		return sourceBillName;
	}

	public void setSourceBillName(String sourceBillName) {
		this.sourceBillName = sourceBillName;
	}

	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public String getCustomerName1() {
		return customerName1;
	}

	public void setCustomerName1(String customerName1) {
		this.customerName1 = customerName1;
	}

	public String getContacts() {
		return contacts;
	}

	public void setContacts(String contacts) {
		this.contacts = contacts;
	}

	public String getContactNumber() {
		return contactNumber;
	}

	public void setContactNumber(String contactNumber) {
		this.contactNumber = contactNumber;
	}

	public String getContacts2() {
		return contacts2;
	}

	public void setContacts2(String contacts2) {
		this.contacts2 = contacts2;
	}

	public String getContactNumber2() {
		return contactNumber2;
	}

	public void setContactNumber2(String contactNumber2) {
		this.contactNumber2 = contactNumber2;
	}

	public String getUseType() {
		return useType;
	}

	public void setUseType(String useType) {
		this.useType = useType;
	}

	public Date getIoDate() {
		return ioDate;
	}

	public void setIoDate(Date ioDate) {
		this.ioDate = ioDate;
	}

	public String getContractId() {
		return contractId;
	}

	public void setContractId(String contractId) {
		this.contractId = contractId;
	}

	public String getContractName() {
		return contractName;
	}

	public void setContractName(String contractName) {
		this.contractName = contractName;
	}

	public String getAffiliatedPersonId() {
		return affiliatedPersonId;
	}

	public void setAffiliatedPersonId(String affiliatedPersonId) {
		this.affiliatedPersonId = affiliatedPersonId;
	}
}